package com.wonderplay.engine;

public class ModuleChangeNotifier {
	public boolean isValid;
	public int sendModule;
	public int changeCode;
	public ModuleChangeMessage message;

	public static final int CHANGE_CODE_INVALID = -1;
	
	public ModuleChangeNotifier(int sendModule) {
		isValid = false;
		this.sendModule = sendModule;
		changeCode = CHANGE_CODE_INVALID;
		message = null;
	}

	public void reset() {
		isValid = false;
		changeCode = CHANGE_CODE_INVALID;
		message = null;
	}

	public void setMessage(int changeCode, ModuleChangeMessage message) {
		this.isValid = true;
		this.changeCode = changeCode;
		this.message = message;
	}
	
	public boolean isValid(){
		return isValid;
	}
}